package com.ssm.mapper;

import com.ssm.pojo.Student;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface StudentMapper {

    List<Student> findAllStudent();

    Student getStudentById(@Param("id") int id);

    /**
     * 查询学生列表(分页显示--pageHelper和参数实体演示)
     * @param student
     * @return
     */
    List<Student> getStudentByCondition(Student student);

    /**
     * 查询学生列表(分页显示--limit)
     * @param name
     * @param age
     * @param currentPageNo
     * @param pageSize
     * @return
     */
    List<Student> getStudentList1(@Param("name") String name,
                                  @Param("age") Integer age,
                                  @Param("from") Integer currentPageNo,
                                  @Param("pageSize") Integer pageSize);

    /**
     * 查询用户列表(分页显示--RowBounds)
     * @param name
     * @param age
     * @param rowBounds
     * @return
     */
    List<Student> getStudentList2(@Param("name") String name,
                                   @Param("age") Integer age, RowBounds rowBounds);




}
